package o2o.dao.PO.user.browse;

import com.jinyou.utils.common.DateUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * @Classname UserBrowseHistory
 * @Description TODO
 * @Date 2019/4/27 11:45
 * @Created by yangtk
 */
@Setter
@Getter
@Accessors(chain = true)
public class UserBrowseHistory {


//    CREATE TABLE `browse_history` (
//            `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '标识 id',
//            `type` INT(1) NOT NULL DEFAULT 1 COMMENT '浏览类型 1店铺 2 商品',
//            `userId` INT(11) NOT NULL COMMENT '用户类型',
//            `shopId` INT(11) DEFAULT NULL COMMENT '店铺id',
//            `goodsId` INT(11) DEFAULT NULL COMMENT '店铺id',
//            `delFlag` INT(1) NOT NULL DEFAULT '0' COMMENT '是否已删除(0未删除,1已删除)',
//            `createTime` BIGINT(15) NOT NULL COMMENT '创建日期  141231212423423时间戳毫秒级标识',
//            `createUser` VARCHAR(22) DEFAULT NULL COMMENT '创建者',
//            `updateUser` VARCHAR(22) DEFAULT NULL COMMENT '最后更新着',
//            `updateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
//    PRIMARY KEY (`id`)
//) ENGINE=INNODB DEFAULT CHARSET=utf8;

    private Long id;
    private Integer type;
    private Long userId;
    private Long shopId;
    private Long goodsId;
    private int delFlag = 0;
    private Long createTime;
    private String createUser;
    private String updateUser;
    private Long updateTime;

    public UserBrowseHistory() {
    }

    public UserBrowseHistory(Integer type, Long userId, Long shopId, Long goodsId, String createUser) {
        this.type = type;
        this.userId = userId;
        this.shopId = shopId;
        this.goodsId = goodsId;
        this.createUser = createUser;
        this.createTime = DateUtils.getCurrTime();
    }
}